package dao.xml;

import model.Termin.TerminArt;

import com.thoughtworks.xstream.converters.SingleValueConverter;

public class TerminArtConverter implements SingleValueConverter{


	  public String toString(Object obj) {
	    TerminArt terminArt = (TerminArt) obj;
	    return terminArt.getKey();
	  }

	  public Object fromString(String terminArt) {
	    
		  return TerminArt.getTerminArt(terminArt);
	  }

	  @SuppressWarnings("unchecked")
    public boolean canConvert(Class type) {
	    return type.equals(TerminArt.class);
	  }
	
}
